home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 47
/
Amiga Format AFCD47 (Issue 131, Xmas 1999).iso
/
-serious-
/
misc
/
fiasco_2.22
/
arexx
/
dbstructure.frx
< prev
next >
Wrap
Text File
|
1999-10-17
|
2KB
|
136 lines
/* dbstructure.frx
* Display structure of Fiasco database
* Copyright © 1997 Nils Bandener
* $VER: dbstructure_frx 6.2 (6.10.97)
*/
scriptname = "DBStructure"
Options Results
/*
* If not called from Fiasco, try to address the active
* Fiasco project
*/
if ~abbrev(address(), "FIASCO.") then
do
ports = show("Ports")
do i = 1 to words(ports)
if abbrev(word(ports, i), "FIASCO.") then
do
Address Value word(ports, i)
GetAttr Project Name Active ARexx
Address Value Result
break
end
end
end
fiasco_port = address()
Signal on Syntax
Signal on Halt
Signal on Break_C
Signal on Failure
LockGUI
GetAttr 'Fields Stem fl'
do i = 1 to fl.count
GetAttr 'Field Name "' || fl.i || '" Stem fd'
say 'Field ID: "' || fl.i || '"'
if fd.listview ~= 0 then
do
say 'Type: ' || fd.type || ' Listview'
end
else
do
say 'Type: ' || fd.type
end
say 'Formula: ' || fd.formula
say 'ARexx Script: ' || fd.arexxscript
say 'InitCont Type: ' || fd.initconttype
say 'InitCont Value: ' || fd.initcontvalue
say 'Virtual: ' || fd.virtual
if symbol(fd.maxchars) = "VAR" then say 'Max Chars: ' || fd.maxchars
if symbol(fd.minvalue) = "VAR" then say 'Min Value: ' || fd.minvalue
if symbol(fd.maxvalue) = "VAR" then say 'Max Value: ' || fd.maxvalue
if symbol(fd.precision) = "VAR" then say 'Precision: ' || fd.precision
if symbol(fd.command) = "VAR" then say 'Command: ' || fd.command
if symbol(fd.stack) = "VAR" then say 'Stack: ' || fd.stack
say
end
bail_out:
Address Value fiasco_port
UnlockGUI
ResetStatus
exit
syntax:
failure:
if show("Ports", fiasco_port) then
do
Address Value fiasco_port
RequestChoice '"Error ' || rc || ' in line ' || sigl || ':*n' || errortext(rc) || '" "Cancel" Title "' || scriptname || '"'
end
else
do
say "Error" rc "in line" sigl ":" errortext(rc)
say "Enter to continue"
pull dummy
end
call bail_out
halt:
break_c:
if show("Ports", fiasco_port) then
do
Address Value fiasco_port
RequestChoice '"Script Abort Requested" "Abort Script" Title "' || scriptname || '"'
if result = 0 then return
end
else
do
say "*** Break"
say "Enter to continue"
pull dummy
end
call bail_out